package com.mnemonic.player.rebot;

import com.mnemonic.enums.Grades;
import com.mnemonic.game.Game;
import com.mnemonic.player.RobotMineListener;
import com.mnemonic.player.RobotPlayer;

/**
 * 机器人小红
 * 
 * @author lifeng
 * @date 2021/05/13
 */
public class XiaohongRobotPlayer extends RobotPlayer {

    private static final long serialVersionUID = 1L;

    public XiaohongRobotPlayer() {

    }

    public XiaohongRobotPlayer(String id, String name) {
        this.id = id;
        this.name = name;
        this.grade = Grades.星耀;
    }

    /**
     * 上帝模式， 看得到 game 中的所有数据
     */
    @Override
    public void autoMine(Game game, RobotMineListener listener) {
        if (game.getMineMap()[0][0] == 0b00000001) {
            game.getMineMap()[0][0] += 0b00000100;
        }
        listener.autoMine(0, 0);
    }
}
